//
//  ActivityTableViewCell.m
//  A_GOGO
//
//  Created by Liuiu on 16/1/21.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "ActivityTableViewCell.h"
#import "UIColor+Wonderful.h"

@implementation ActivityTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        //image
        _image  =[[UIImageView alloc]init];
       
        [self.contentView addSubview:_image];
        [_image release];
        
        //title
        _title = [[UILabel alloc]init];
        
        _title.font =[UIFont systemFontOfSize:15];
       
        [self.contentView addSubview:_title];
        [_title release];
        
        //time
        _time = [[UILabel alloc]init];
        _time.text =@"活动时间:";
        _time.textAlignment = NSTextAlignmentCenter;
        
        _time.font = [UIFont systemFontOfSize:13];
        [self.contentView addSubview:_time];
        [_time release];
        
        //startTime
        _startTime = [[UILabel alloc]init];
        _startTime.textColor = [UIColor grayColor];
        _startTime.textAlignment =NSTextAlignmentCenter;
        _startTime.font =[UIFont systemFontOfSize:13];
        
        
        [self.contentView addSubview:_startTime];
        [_startTime release];
        
        //gang
        _gang =[[UILabel alloc]init];
        _gang.text = @"-";
        _gang.textAlignment = NSTextAlignmentCenter;
        _gang.textColor =[UIColor darkGrayColor];
        [self.contentView addSubview:_gang];
        [_gang release];
        
        //endTime
        _endTime =[[UILabel alloc]init];
        _endTime.textColor = [UIColor grayColor];
        _endTime.textAlignment =NSTextAlignmentCenter;
        _endTime.font =[UIFont systemFontOfSize:13];
        
        [self.contentView addSubview:_endTime];
        [_endTime release];
        
        //jion
        _jion =[[UILabel alloc]init];
        _jion.text = @"参与活动";
        _jion.font = [UIFont systemFontOfSize:14];
        _jion.textAlignment = NSTextAlignmentCenter;
        _jion.textColor = [UIColor goldColor];
        [self.contentView addSubview:_jion];
        [_jion release];
        
        //img
        _img =[[UIImageView alloc]init];
        _img.image = [UIImage imageNamed:@"ing"];
        [self.contentView addSubview:_img];
        [_img release];
        
        //xian
        _xian =[[UILabel alloc]init];
        _xian.backgroundColor = [UIColor gainsboroColor];
        [self.contentView addSubview:_xian];
        [_xian release];
        
        
    }
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];

    _image.frame = CGRectMake(5, 10, self.contentView.frame.size.width - 10, 130);
    _img.frame = CGRectMake(self.contentView.frame.size.width - 45, 10, 40, 40);
    _title.frame = CGRectMake(5, 140, 190, 30);
    _time.frame = CGRectMake(0, 170, 80, 20);
    _startTime.frame = CGRectMake(70, 170, 90, 20);
    _gang.frame = CGRectMake(160, 170, 10, 20);
    _endTime.frame = CGRectMake(170, 170, 90, 20);
    _xian.frame = CGRectMake(0, 209, self.contentView.frame.size.width, 1);
    _jion.frame = CGRectMake(280, 155, 80, 25);
    _jion.layer.cornerRadius = 5;
    _jion.layer.borderColor = [UIColor goldColor].CGColor;
    _jion.layer.borderWidth = 0.3;

}








@end
